package com.drguo.higouguo.web;

import java.io.ByteArrayInputStream;

import com.drguo.higouguo.utils.VerifyCode;
import com.opensymphony.xwork2.ActionContext;

/**
 * 管理员登录界面验证码
 * @author guo
 */
public class RandomAction {
	private ByteArrayInputStream inputStream;
	
	public String execute(){
		VerifyCode verifyCode = VerifyCode.Instance();
		inputStream = verifyCode.getImage();
		ActionContext.getContext().getSession().put("vcode", verifyCode.getStr());
		return "success";
	}

	public ByteArrayInputStream getInputStream() {
		return inputStream;
	}

	public void setInputStream(ByteArrayInputStream inputStream) {
		this.inputStream = inputStream;
	}
}
